// 文章的路由模块

const express = require('express')
const router = express.Router()

// 导入需要的处理函数模块
const article_handler = require('../router_handler/article')

const {add_article_schema} = require('../scgena/artcate')

// 导入验证数据的中间件
const expressJoi = require('@escook/express-joi')
// 添加和删除图片
router.post('/uploads',article_handler.uploads)
router.post('/deleteUploads',article_handler.deleteUploads)
router.get('/getimages',article_handler.getimages)
// 发布文章的路由
router.post('/addarticle',article_handler.addArticle)
// 根据id删除文章接口
router.post('/deletearticle/:id',article_handler.deleteArticle)

// 获取文章路由
router.get('/article', article_handler.getArticle)


module.exports = router
